    <link rel="stylesheet" type="text/css" href="css/ui/Calendar.css"/>
	<link rel="stylesheet" type="text/css" href="http://www.12301.cc/tpl/newOrder/css/base.css"/>
	<link rel="stylesheet" type="text/css" href="http://www.12301.cc/tpl/newOrder/css/fillOrder.css"/>
	<link rel="stylesheet" href="http://www.12301.cc/css/common/www.12301.cc.global.css"/>
	<script type="text/javascript" src="http://www.12301.cc/tpl/new_tpl/credit/js/global.js"></script>
	<!-- <script src="http://www.12301.cc/js/popBox.js"></script> -->
	<style>
		ul.ul_ul {
			display:none;
			position: absolute;
			margin-left: 537px;
			margin-top: 0px;
			border: 1px solid red;
			width: auto;
			padding: 10px;
			height: auto;
			background-color: white;
		}
		cancel_cost {
			cursor:pointer
		}
	</style>
	<?php $begintime = date('Y-m-d')?>
	<?php $leavetime=date("Y-m-d",strtotime($begintime)+24*3600);?>
	<div class="conWrap">
		<form  method="post"  id="submit_"> 
		<input type="hidden" name="pid" class="pid" id="pid" value=""/>
		<input type="hidden" name="aid" class="aid" id="aid" value=""/>
		<input type="hidden" class="type" value=""/>			<!--需要留的景区类型-->
		<input type="hidden" name="paymode" id="paymode_online" value=""/>    	<!--需要留的支付方式-->
		<input type="hidden" id="tourist_info" value=""/>  						<!--需要留的游客信息填写-->
		<input type="hidden" id="sub_val" value=""/>
		<input type="hidden" id="token" value="<?=$var['token']?>"/>
		<input type="hidden" id="appid" value="<?=$var['appid']?>"/>
		<input type="hidden" id="signature" value="<?=$var['signature']?>"/>
		<input type="hidden" name="tnum" id="tnum_hotel" value="1"/>
			<p class="title pro_name"></p>
			<div class="hotelBox" style="display:none">
			<!--酒店预订模块开始-->
				<ul>
					<li class="fList">
						<span class="w70 lh35">房间类型：</span>
						<span class="lh35 pro_name_c"></span>
					</li>
					<li class="fList">
						<span class="w70">预订数量：</span>
						<select id="roomNum" class="groupSelect w160">  
						  <option value ="">1</option>  
						  <option value ="">2</option>  
						</select> 
					</li>
					<li class="fList">
						<span class="w70">入住时间：</span>
						<div class="dBox">
							<img class="iconDateImg" src="http://images.12301.cc/icon/iconDate.png" />
							<input class="baseInp w140 begintime_hotel" readonly name="begintime" id="begintime_hotel" type="text" />
						</div>
						<span>至</span>
					   <div class="dBox">
							<img class="iconDateImg" src="http://images.12301.cc/icon/iconDate.png" />
							<input class="baseInp w140" id="leavetime_hotel" readonly name="leavetime" type="text" value="<?=$leavetime?>" />
						</div>
						<div class="hotelListBox">
							<ul id="roomer_num">
								
							</ul>    
						</div>
					</li>
				</ul>
				<!--酒店预订模块结束-->        
			</div>
			
					
			    
			<div class="dateBox" style="display:none">
				<!--景区，路线模块开始-->   
				<span>游玩日期：</span>
				<div class="dBox">
					<img class="iconDateImg" src="http://images.12301.cc/icon/iconDate.png" />
					<input class="baseInp w140 begintime" readonly type="text" id="begintime" name="begintime" value=""/>
				</div>
						
				<span class="colorOrange htmlValid">（仅当天有效）</span>
				<span class="colorOrange verify_time"></span>
				<!--路线-->
				<div class="lineBox" style="display:none">  
					<span>集合地址：</span>
					<select class="groupSelect line_list w200">  
					  <option value ="">线路1</option>  
					  <option value ="">线路2</option>   
					</select> 
				</div>
				<!--路线end-->
				<!--景区，路线模块结束-->  
			</div>
			 <div class="tipMsgBox"></div>
             
             
			<div class="tbTicketBox">
				<table class="tbTicket" border="0" cellpadding="0" cellspacing="0"></table>
			</div>
			
			<div class="inclueBox" style="display:none">
			<!--套票中的子票详情开始-->
				<p class="iTitle">包含票类：</p>
				<ul class="child_list"></ul>
					
			<!--套票中的子票详情结束-->
			</div>
			
			
			
			<div class="recommendBox" style="display:none">
			<!--单票中的套票推荐详情开始-->
				<p class="iTitle">推荐套票：</p>
				<ul>
					<li class="list">
						<div class="lt">
							<img class="pImg" src="http://images.12301.cc/helpCenter/15.jpg" />
						</div>
						<div class="rt">
							<div class="pDetail">
								<p>XXXXXXX产品*2</p>
								<p>XXXXXXX产品*2</p>
							</div>
							<div class="priceBox">
								<span class="colorOrange size20">&yen;500</span>
								<i class="colorGray">起</i>
							</div>
							<button class="buyBtn">立即购买</button>
						</div>
					</li>
					<li class="list">
						<div class="lt">
							<img class="pImg" src="http://images.12301.cc/helpCenter/15.jpg" />
						</div>
						<div class="rt">
							<div class="pDetail">
								<p>XXXXXXX产品*2</p>
								<p>XXXXXXX产品*2</p>
							</div>
							<div class="priceBox">
								<span class="colorOrange size20">&yen;500</span>
								<i class="colorGray">起</i>
							</div>
							<button class="buyBtn">立即购买</button>
						</div>
					</li>
					<li class="list">
						<div class="lt">
							<img class="pImg" src="http://images.12301.cc/helpCenter/15.jpg" />
						</div>
						<div class="rt">
							<div class="pDetail">
								<p>XXXXXXX产品*2</p>
								<p>XXXXXXX产品*2</p>
							</div>
							<div class="priceBox">
								<span class="colorOrange size20">&yen;500</span>
								<i class="colorGray">起</i>
							</div>
							<button class="buyBtn">立即购买</button>
						</div>
					</li>
				</ul>  
			<!--单票中的套票推荐详情结束-->
			</div>
			
			
			
			<ul class="ul_ul"></ul>
			<div class="fillMsgBox">
				<div class="clearBox">
					<span class="tip">联系人信息</span>
					<span class="colorGray">（请准确填写，以便接收订单短信）</span>
				</div>
				<!--联系人信息模块开始-->
				<div class="conBox">
					<div class="lt">
						<ul>
							<li class="fList">
								<span class="w70"><i class="colorRed">*</i>联系人：</span>
								<input class="baseInp w300 contato" name="ordername" mind="" type="text" />
								<span class="warning_msg contato_m"></span>
							</li>
							<li class="fList">
								<span class="w70"><i class="colorRed">*</i>手机号：</span>
								<input class="baseInp w300 telefone" name="ordertel" mind="" type="text" />
								<span class="warning_msg telefone_m"></span>
							</li>
							<li class="fList">
								<span class="w70"><i class="colorRed"></i>身份证：</span>
								<input class="baseInp w300 idCards" name="idCard" mind="" type="text" />
								<span class="warning_msg idCards_m" ></span>
							</li>
							<li class="fList">
								<span class="w70">订单备注：</span>
								<input class="baseInp w300 memo" name="memo" type="text" />
								<span class="warning_msg memo_m"></span>
							</li>   
						</ul>
						<a href="javascript:void(0)" class="saveUserBtn">保存至常用联系人</a>
					</div>
					<div class="rt">
						<p class="minTitle">常用联系人</p>
						<div class="nameBox">
							<ul>
								
							</ul>
						</div>
					</div>
				</div>   
				<!--联系人信息模块结束-->
				
				
				<div class="clearBox tourist_info" style="display:none">
				<!--游客信息信息模块开始-->
					<span class="tip"> <span class="colorRed">*</span>游客信息</span>
					<span class="colorGray">（每张票提供相关游客信息）</span>
				</div>
					<div class="tInfoBox" style="display:none">
						<ul class="Info">
							<li class="iList">
								<span class="w70">姓名：</span>
								<input class="baseInp w200 tourist_name" name="tourist_name[]" num="0" type="text" value="" />
							</li>  
							<li class="iList">
								<span class="w70">身份证：</span>
								<input class="baseInp w200 tourist_cert" name="tourist_cert[]" num="0" type="text" value="" />
							</li>
						</ul>
					</div>
				<!--游客信息信息模块结束-->
				
				
				<div class="pMethodBox">
				<!--支付方式模块开始-->
					<span class="tip">支付方式</span>
					<ul class="i_pMethod payStyle">
						<li class="mList">
							<label><input class="pRadio Account paymode" name="paymode" type="radio" value="0"  checked="checked">账户余额</label> 
							<span class="setMargin"><i class="size16 balance"></i>元</span>
							<span class="colorOrange msg_a" style="display:none;">余额不足，请充值！</span>
						</li>
						<li class="mList"> 
							<label><input class="pRadio Online paymode" name="paymode" type="radio" money="a" value="1">在线支付 </label> 
						</li>
						<li class="mList">
							<label><input class="pRadio Credit paymode" name="paymode" type="radio" value="2">授信余额</label> 
							<span class="setMargin"><i class="size16 credit3"></i>元</span>
							<span class="colorOrange msg_c" style="display:none;">余额不足，请充值！</span>
						</li>
						
					</ul>
					<ul class="i_pMethod payStyle_" style="display:none">
						<li class="mList">
							<label><span class="pRadio super"  type="text"  >预订自供产品，无需支付</span></label> 
						</li>
					</ul>
					<ul class="i_pMethod payStyle_now" style="display:none">
						<li class="mList">
							<label><span class="pRadio pay_now"  type="text"  >现场支付</span></label> 
						</li>
					</ul>
				</div>  
				<!--支付方式模块结束-->
			</div>
			<div class="subBox">
				<span class="sumtnum">总票数：<i class="colorOrange size16 margin2" id="sumtnum">1</i>张</span>
				<span class="margin20">合计：<i class="colorOrange margin2">&yen;</i><i class="colorOrange size16" id="summoney">3.00</i></span>
				<a href="javascript:void(0)" id="submitBtn">提交订单</a>
			</div>
    </div>
</form>
	<!--供应商，产品信息模块开始-->
    <div class="cWrap">
        <div class="line">
            <span class="list">
                <i class="colorGray">供应商名称：</i> 
                <i class="size14 suppler_su"></i>
            </span>
            <span class="list"> 
                <i class="colorGray f">联系人：</i>
                <i class="size14 cname"></i>
                <a class="iconfont qq qq_href" target="_blank"  href="http://wpa.qq.com/msgrd?v=3&amp;uin=1048450178&amp;site=qq&amp;menu=yes" alt="联系客服" title="联系客服">&#xe66f;</a>
            </span>
        </div>
        <div class="orderCon"></div> 
    </div> 
	<!--供应商，产品信息模块结束-->
	<script type="text/javascript" src="http://www.12301.cc/tpl/newOrder/js/PopWindow.js"></script>
    <script type="text/javascript" src="http://www.12301.cc/tpl/newOrder/js/Calendar.js"></script>
	<script type="text/javascript" src="http://www.12301.cc/tpl/newOrder/js/Calendar_hotel.js"></script>
    
	<script type="text/html" id="tourist_tmpl">
		<ul class="Info">
			<li class="iList">
				<span class="w70">姓名：</span>
				<input class="baseInp w200 tourist_name" name="tourist_name[]" num="{:n}" type="text" value="" />
			</li>  
			<li class="iList">
				<span class="w70">身份证：</span>
				<input class="baseInp w200 tourist_cert" name="tourist_cert[]" num="{:n}" type="text" value="" />
			</li>
		</ul>
	</script>
	<script type="text/html" id="pri_tmpl">
		<li class="hList" price="{:jsprice}">
			<p class="hTitle">{:date}({:weekT})</p>
			<div class="hCon">
				<p class="colorOrange size14"><i class="mr2">&yen;</i>{:jsprice}</p>
				<p class="remain" re="{:remain}">{:remain}间</p>
				<input type="hidden"  class="tnum" value="{:tnum}">
				<input type="hidden" name="pids[{:pid}]" value="{:tnum}">
			</div>
		</li>
		
	</script>
	<script type="text/html" id="roomer_tmpl">
		<input type="text" class="inputText roomer more gray" name="tourist_name_{:i}" value="入住人{:i}"/>
	</script>
	<script type="text/javascript" src="http://www.12301.cc/js/ui/JsTpl.js"></script>
	<script type="text/javascript" src="js/global/Date_func.js"></script>
	<script type="text/javascript" src="http://www.12301.cc/tpl/newOrder/js/fillOrder_new.js"></script>
	<script>
	var popWindow=new PopWindow("popWindow");
		$("#begintime_hotel").click(function(){	
			Calendar_hotel.init.timeElement=this;
			//var pid=parseInt($(".pid").val()),
			var	date=$(this).attr("time"),
				yearmonth=date.substr(0,7),
				pid = G.getQueryString("pid");
				aid = G.getQueryString("aid");
			Calendar_hotel.show(yearmonth,pid,"11-28",aid);
		});
	</script>
	
	
	
 <!--    <script>
	var popWindow=new PopWindow("popWindow");
	/*显示游玩日期*/
	(function(){
		Calendar.init.handles.push(function(elem){
			
			$.ajax({
				"url":"call/ajax_price.php",
				"data":{"date":$("#begintime").val(),"pid":$("#pid").val(),"aid":parseInt($("#aid").val())},
				"async":false,
				"dataType":"json",
				"success":function(data){
					for(var pid in data){
			
						
						$(".ticket_"+pid).find(".stroage").attr("ticket",data[pid]["storage"]);			//改写库存
						$(".ticket_"+pid).find(".stroage").html(data[pid]["storage"]);					//改写库存
						$(".ticket_"+pid).find(".tnum").attr("ticket",data[pid]["storage"]);			//改写库存
						$(".ticket_"+pid).find(".jsprice").html(data[pid]["jsprice"]/100);  			//改写结算价
						$(".ticket_"+pid).find(".class_price").attr("price",data[pid]["jsprice"]/100);  //改写结算价
						// var jsprice_str="tprice_"+pid;
						// var uprice_str="uprice_"+pid;
						// var storage_str="storage_"+pid;
						// if($("input[type='hidden']."+jsprice_str).size()>0){
							// if(data[pid]['jsprice']>=0){
								// $("input[type='hidden']."+jsprice_str).val(data[pid]['jsprice']/100);
								// $("em."+jsprice_str).html("¥"+data[pid]['jsprice']/100);
								 // $("em."+uprice_str).html("¥"+data[pid]['uprice']/100);
								// $("em."+storage_str).html(data[pid]['storage']);
							 // }else{
								 // var con=$("input[type='hidden']."+jsprice_str).get(0);
								 // con.parentNode.parentNode.parentNode.removeChild(con.parentNode.parentNode);
							// }
						 // }
					}
					countTotal();
				}
			})
		});
		$(".begintime").click(function(){	
			Calendar.init.timeElement=this;
			var pid=parseInt($("#pid").val()),

				date=$(this).attr("time"),
				yearmonth=date.substr(0,7),
				aid=parseInt($("#aid").val());
			Calendar.show(yearmonth,pid,0,aid);
			$("#calendarContent .data_time").each(function(e){
				var date = $(this).attr("data");
				var time = new Date(date);
				//console.log(time)
				//console.log(time.getTime());
			})
		});
		
		
		
		$("#begintime_hotel").click(function(){	
			Calendar_hotel.init.timeElement=this;
			//var pid=parseInt($(".pid").val()),
			var	date=$(this).attr("time"),
				yearmonth=date.substr(0,7),
				pid = G.getQueryString("pid");
				aid = G.getQueryString("aid");
			Calendar_hotel.show(yearmonth,pid,0,aid);
			Calendar_hotel.show(yearmonth,pid,"11-27",aid);
		});
		
		//Calendar_hotel.show(yearmonth,pid,"2015-11-27",aid)
	})();
	
	</script>
    
    
  <script>
	
	var w = {
		Hotel : function(opt){
			var opt = opt || {};
			console.log(opt)
		
		}
	
	};
	
		
	var H = {
	
		Hotel : function(opt){
			var opt = opt || {};
			var htmlText = "";
			var weekTs={"0":"周日","1":"周一","2":"周二","3":"周三","4":"周四","5":"周五","6":"周六"};
			var weekT;
			var pricelists = opt.pricelists;
			var beginDate = pricelists[0]["date"];   //获取的日期
			var remain = pricelists[0]["remain"];   //获取第一天的库存
			//console.log(remain)
			//var beginDate=$("#begintime_hotel").val();
			var beginTime=Date_func.dateToUnix(beginDate);
			//for(var i=0;i<1;i++){
				date=Date_func.unixToDate(beginTime+3600*24*1000);
				jsprice=pricelists[0]["sprice"];
				$("#summoney").attr("t",jsprice);
				roomStatus="";
				if(jsprice==-1){
					roomStatus="不限";
				}
				else{
					remain=pricelists[0]["remain"];
					if(remain=="-1"){
						roomStatus="不限";
					}else{
					//if(remain<maxbuytnum) maxbuytnum=remain;
						roomStatus="余 "+remain+"";
					}
				}
				
				// $("#maxbuytnum").val(maxbuytnum);
				// if($("#roomNum").val()-$("#maxbuytnum").val()>0){
					// $("#roomNum").val(maxbuytnum);
				// }
				//if(jsprice<=0||jsprice==undefined) continue; 
				tnum=$("#roomNum").val() || 1;
				weekT=weekTs[Date_func.dateWeek(date)];
				var pid = G.getQueryString("pid");
				htmlText+=JsTpl.assign($("#pri_tmpl").html(),{"date":date.substr(5),"remain":remain,"jsprice":jsprice,"pid":pid,"tnum":tnum,"weekT":weekT,"roomStatus":roomStatus});
			//}
			$("#roomer_num").html(htmlText);
			$(".remain").each(function(){
				var remain = $(this).attr("re");
				if(remain=="-1"){
					$(this).html("不限")
				}
			})
			//countTotal();
		}

	}
	var yearmonth = "2015-11",
		pid = G.getQueryString("pid"),
		aid = G.getQueryString("aid");
	$.ajax({
		url:"call/storage_Calendar_Ajax.php",
			async:false,
			type:"GET",
			dataType:"json",
			data:{"orderMonth":yearmonth,"pid":pid, "aid":aid},
			success:function(json){
				H.Hotel(json);
			}
		})
  
  
  
  
  </script>
     -->
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
